package data_creation;

import poki.model.Card;
import poki.model.CardSet;

@SuppressWarnings("javadoc")
public class Michi {
	
	public int n = 0;

	public void calculate()
	{
		for(int i = 0; i < 52; i++)
		{
			for(int j = i + 1; j < 52; j++)
			{
				Card handCard1 = new Card(i % 13 + 2, (int)Math.floor(i / 13) + 1);
				Card handCard2 = new Card(j % 13 + 2, (int)Math.floor(j / 13) + 1);
				this.calculateForHand(handCard1, handCard2);
			}
		}
	}
	
	public void calculateForHand(Card handCard1, Card handCard2)
	{
		CardSet handCards = new CardSet();
		handCards.addCard(handCard1);
		handCards.addCard(handCard2);

		for(int i = 0; i < 52; i++)
		{
			for(int j = i + 1; j < 52; j++)
			{
				for(int k = j + 1; k < 52; k++)
				{
					Card communityCard1 = new Card(i % 13 + 2, (int)Math.floor(i / 13) + 1);
					Card communityCard2 = new Card(j % 13 + 2, (int)Math.floor(j / 13) + 1);
					Card communityCard3 = new Card(k % 13 + 2, (int)Math.floor(k / 13) + 1);
					if(!handCards.containsCard(communityCard1) && !handCards.containsCard(communityCard2) && !handCards.containsCard(communityCard3))
					{
						this.calculateForHandAnd3CommunityCards(handCard1, handCard2, communityCard1, communityCard2, communityCard3);
					}
				}
			}
		}
	}

	public void calculateForHandAnd3CommunityCards(Card handCard1, Card handCard2, Card communityCard1, Card communityCard2, Card communityCard3)
	{
		System.out.println(handCard1 + " " + handCard2 + " " + communityCard1 + " " + communityCard2 + " " + communityCard3);
	}

	public static void main(String[] args)
	{
		Michi m = new Michi();
		m.calculate();
		System.out.println(m.n);
	}

}
